const mongoose = require("mongoose");

const RoleSchema = new mongoose.Schema({
  name: { type: String },
  // menu: { type: mongoose.Schema.Types.ObjectId, ref: 'Menu' },
  menu:{
    type: [{
      type: mongoose.Schema.Types.ObjectId,
      ref: "Menu"
    }],
  }
});

const Role = mongoose.model("Role", RoleSchema);
module.exports = {
  Role
};
